﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="wfrmMyClientProyectoBuscar.aspx.cs" Inherits="wfrmMyClientProyectoBuscar" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>
<%@ Register Assembly="AnthemExtensions" Namespace="AnthemExtensions" TagPrefix="anthemext" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"  Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"  Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"   Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"   Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"  Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.1.Export, Version=10.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dxwgv" %>
<script type="text/javascript">

var keyValue;
function AbrirVentanaRevision(element, key) {
   callbackPanel.SetContentHtml("");
   popup.ShowAtElement(element);
   keyValue = key;
}

function popup_Shown(s, e) {
   callbackPanel.PerformCallback(keyValue);
}

function fr_ValidarRechazo(s, e){    
    rechazado = document.getElementById('ctl00_ContentPlaceHolder1_CtlListaOrden1_popup_callbackPanel_optProcede_RB0_I').checked;   
    rpt = document.getElementById('ctl00_ContentPlaceHolder1_CtlListaOrden1_popup_callbackPanel_txtRespuesta');
    
    if ((rechazado == true) && (rpt.value == ""))
    {             
        alert('Ingrese la razón por la que Rechaza la solicitud en el campo Respuesta');
        rpt.focus();
        e.processOnServer = false;
    }
    else
    {                
        e.processOnServer = confirm('Esta seguro de continuar?');
    }
   
}
function OnRowClick(e){
_aspxClearSelection();
dgvCategoria._selectAllRowsOnPage(false);
dgvCategoria.SelectRow(e.visibleIndex,true);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Listado de Proyectos MyClient</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
                            <br />
        <dx:ASPxGridView ID="dgvCategoria" runat="server" AutoGenerateColumns="False" Width="654px" Caption="Listado del Myclient" ClientInstanceName="dgvCategoria" DataSourceID="SqlDataSource1" KeyFieldName="CCLIENTE">
            <Styles>
                <Header CssClass="tableHeader" Font-Bold="True" ForeColor="White">
                </Header>
                <AlternatingRow Enabled="True">
                </AlternatingRow>
                <PagerBottomPanel BackColor="#D7C8C7" ForeColor="White">
                </PagerBottomPanel>
            </Styles>
            <SettingsPager>
                <Summary AllPagesText="P&#225;ginas: {0} - {1} ({2} Categor&#237;as)" Text="P&#225;gina {0} of {1} ({2} Categor&#237;as)" />
            </SettingsPager>
            <ClientSideEvents RowClick="function(s, e) { OnRowClick(e);}" />
            <Columns>
                <dx:GridViewCommandColumn VisibleIndex="0">
                    <ClearFilterButton Visible="True">
                    </ClearFilterButton>
                </dx:GridViewCommandColumn>
                <dx:GridViewDataTextColumn Caption="Codigo Cliente" FieldName="CCLIENTE" VisibleIndex="1">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Codigo Encargo" FieldName="CENCARGO" VisibleIndex="2">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Encargo" FieldName="ENCARGO" VisibleIndex="3">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Cliente" FieldName="CLIENTE" VisibleIndex="4">
                </dx:GridViewDataTextColumn>
                <dx:GridViewDataTextColumn Caption="Master Data" FieldName="MASTERDATA" VisibleIndex="5">
                </dx:GridViewDataTextColumn>
            </Columns>
            <Settings ShowFilterRow="True" />
        </dx:ASPxGridView>
        <br />
                            <asp:Button ID="btnSeleccionar" runat="server" Text="Seleccionar" /><asp:SqlDataSource
                                ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GPConnectionString2 %>" SelectCommand="SELECT [CCLIENTE], [CENCARGO], [ENCARGO], [MASTERDATA], [CLIENTE] FROM [TB_MYCLIENT]">
                            </asp:SqlDataSource>
       </div>
    </form>
</body>
</html>

